package com.hm.cms.domain;

import org.springframework.data.mongodb.core.index.CompoundIndex;
import org.springframework.data.mongodb.core.index.CompoundIndexes;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

import com.hm.cms.auto.su.BaseDomain;
import com.hm.cms.auto.su.R;

import lombok.Getter;
import lombok.Setter;

/**
 * @author shishun.wang
 * @date 下午2:22:29 2017年11月14日
 * @version 1.0
 * @describe 黑名单，限制访问
 */
@Setter
@Getter
@Document(collection = R.Database.prefix + "BLACK_LIST")
@CompoundIndexes({ @CompoundIndex(name = "ip,open", def = "{'ip': 1, 'open': 1}"),
		@CompoundIndex(name = "domain_name,open", def = "{'domain_name': 1, 'open': 1}") })
public class BlacklistDomain extends BaseDomain {

	private static final long serialVersionUID = 1L;

	/**
	 * ip地址
	 */
	private String ip;

	/**
	 * 域名
	 */
	@Field(value = "domain_name")
	private String domainName;

	/**
	 * 描述
	 */
	private String remark;

	/**
	 * 开启黑名单
	 */
	private Boolean open;
}
